﻿using System.Net;
using NewLife.Net;
using NewLife.Remoting;

namespace newlife.rpc.server.console
{
    internal class Program
    {
        static void Main()
        {
            var server = new ApiServer(new NetUri 
            { 
                Type = NetType.Tcp,
                Address = IPAddress.Any,
                Port = 8080
            });

            server.Register<DeviceService>();
            server.Start();

            Console.WriteLine("服务端已启动，按任意键退出...");
            Console.ReadKey();
        }
    }
}
